package com.ezops.poc.transformer;

import org.dozer.DozerBeanMapper;
import org.springframework.stereotype.Component;

import com.ezops.poc.bo.EzopsOTModel;
import com.ezops.trade.processing.partners.orchestrade.OrchesTradeModel;

/**
 * Converts the Ezops model into the destination format.
 * @author vgaurav
 *
 */
@Component(value="destinationFormatConverter")
public class DestinationFormatConvertor {

	
	
	/**
	 * Convert the EzopsCdsModel into OrchesTradeCDSModel.
	 * Assumption - The field names in both the models are same, so using default dozer mapping.
	 * @param data
	 * @return
	 */
//	public OrchesTradeCDSModel convert(EzopsCDSModel data) {
//		DozerBeanMapper mapper = new DozerBeanMapper();
//		return mapper.map(data, OrchesTradeCDSModel.class);
//	}
	
	public OrchesTradeModel convert(EzopsOTModel data) {
		DozerBeanMapper mapper = new DozerBeanMapper();
		return mapper.map(data, OrchesTradeModel.class);
	}
}
